home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJDEV200.ZIP / include / termios.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-21  |  2.9 KB  |  128 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_sys_termios_h_
  3. #define __dj_include_sys_termios_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #ifndef __STRICT_ANSI__
  12.  
  13. #define B0    0x00000000
  14. #define B50    0x00000001
  15. #define B75    0x00000002
  16. #define B110    0x00000003
  17. #define B134    0x00000004
  18. #define B150    0x00000005
  19. #define B200    0x00000006
  20. #define B300    0x00000007
  21. #define B600    0x00000008
  22. #define B1200    0x00000009
  23. #define B1800    0x0000000a
  24. #define B2400    0x0000000b
  25. #define B4800    0x0000000c
  26. #define B9600    0x0000000d
  27. #define B19200    0x0000000e
  28. #define B38400    0x0000000f
  29.  
  30. #define BRKINT    0x00000100
  31. #define ICRNL    0x00000200
  32. #define IGNBRK    0x00000400
  33. #define IGNCR    0x00000800
  34. #define IGNPAR    0x00001000
  35. #define INLCR    0x00002000
  36. #define INPCK    0x00004000
  37. #define ISTRIP    0x00008000
  38. #define IXOFF    0x00010000
  39. #define IXON    0x00020000
  40. #define PARMRK    0x00040000
  41.  
  42. #define OPOST    0x00000100
  43.  
  44. #define CLOCAL    0x00000100
  45. #define CREAD    0x00000200
  46. #define CS5    0x00000000
  47. #define CS6    0x00000400
  48. #define CS7    0x00000800
  49. #define CS8    0x00000c00
  50. #define CSIZE    0x00000c00
  51. #define CSTOPB    0x00001000
  52. #define HUPCL    0x00002000
  53. #define PARENB    0x00004000
  54. #define PARODD    0x00008000
  55.  
  56. #define ECHO    0x00000100
  57. #define ECHOE    0x00000200
  58. #define ECHOK    0x00000400
  59. #define ECHONL    0x00000800
  60. #define ICANON    0x00001000
  61. #define IEXTEN    0x00002000
  62. #define ISIG    0x00004000
  63. #define NOFLSH    0x00008000
  64. #define TOSTOP    0x00010000
  65.  
  66. #define TCIFLUSH
  67. #define TCIOFF
  68. #define TCIOFLUSH
  69. #define TCION
  70. #define TCOFLUSH
  71. #define TCOOFF
  72. #define TCOON
  73.  
  74. #define TCSADRAIN    1
  75. #define TCSAFLUSH    2
  76. #define TCSANOW        3
  77.  
  78. #define VEOF    1
  79. #define VEOL    2
  80. #define VERASE    3
  81. #define VINTR    4
  82. #define VKILL    5
  83. #define VMIN    6
  84. #define VQUIT    7
  85. #define VSTART    8
  86. #define VSTOP    9
  87. #define VSUSP    10
  88. #define VTIME    11
  89. #define NCCS    12
  90.  
  91. typedef unsigned cc_t;
  92. typedef unsigned speed_t;
  93. typedef unsigned tcflag_t;
  94.  
  95. struct termios {
  96.   cc_t        c_cc[NCCS];
  97.   tcflag_t    c_cflag;
  98.   tcflag_t    c_iflag;
  99.   tcflag_t    c_lflag;
  100.   tcflag_t    c_oflag;
  101. };
  102.  
  103. speed_t    cfgetispeed(const struct termios *_termios_p);
  104. speed_t cfgetospeed(const struct termios *_termios_p);
  105. int    cfsetispeed(const struct termios *_termios_p, speed_t _speed);
  106. int    cfsetospeed(const struct termios *_termios_p, speed_t _speed);
  107. int    tcdrain(int _fildes);
  108. int    tcflow(int _fildes, int _action);
  109. int    tcflush(int _fildes, int _queue_selector);
  110. int    tcgetattr(int _fildes, struct termios *_termios_p);
  111. int    tcsendbreak(int _fildes, int _duration);
  112. int    tcsetattr(int _fildes, int _optional_actions, const struct termios *_termios_p);
  113.  
  114. #ifndef _POSIX_SOURCE
  115.  
  116. #endif /* !_POSIX_SOURCE */
  117. #endif /* !__STRICT_ANSI__ */
  118. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  119.  
  120. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  121. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  122.  
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126.  
  127. #endif /* !__dj_include_sys_termios_h_ */
  128.